"""
  模块描述：异常号码检测模块服务调用-示例
  @author 8522
  @date 2022-05-17 16:33:38
  版权所有 Copyright www.dahantc.com
"""

from errorphone import errorPhoneEntity
from errorphone.errrorPhoneClient import ErrorPhoneClient

account = "dhst8526"
password = "bb43a2c4081bec02fca7b72f38e63021"
client = ErrorPhoneClient("http://180.168.192.126:16766")

# 号码状态查询
def test_qryPhoneStatus():
    param = errorPhoneEntity.QryPhoneStatusParam(account, password, "18552440714,185****0716")
    print("入参：" + str(param.parseDict()))
    print("返参：" + str(client.qryPhoneStatus(param).parseDict()))

# 号码属性查询
def test_qryPhoneProperty():
    param = errorPhoneEntity.QryPhonePropertyParam(account, password, "18552440714,185****0716")
    print("入参：" + str(param.parseDict()))
    print("返参：" + str(client.qryPhoneProperty(param).parseDict()))


if __name__ == '__main__':
    # 号码状态查询
    test_qryPhoneStatus()

    # 号码属性查询
    test_qryPhoneProperty()